package com.dragon.modules.yuegou.query.points;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.points.RateEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;
/**
 * 积分与现金兑换配比表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-05-18 10:26:50
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class RateQuery extends RateEntity implements Query<RateEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 一级业态查询条件 */
	@JsonUnwrapped(prefix = "firstBtypeId")
	private Condition<String> firstBtypeIdCondition;

    /** 二级业态查询条件 */
	@JsonUnwrapped(prefix = "secondBtypeId")
	private Condition<String> secondBtypeIdCondition;

    /** 商铺id查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 微信店铺名称查询条件 */
	@JsonUnwrapped(prefix = "wxShopName")
	private Condition<String> wxShopNameCondition;

    /** 微信店铺编号查询条件 */
	@JsonUnwrapped(prefix = "wxShopNumber")
	private Condition<String> wxShopNumberCondition;

    /** 积分配比类型 多个 0,1查询条件 */
	@JsonUnwrapped(prefix = "ratio")
	private Condition<String> ratioCondition;

    /** 线下积分查询条件 */
	@JsonUnwrapped(prefix = "points")
	private Condition<Integer> pointsCondition;

    /** 线上积分查询条件 */
	@JsonUnwrapped(prefix = "onlinePoints")
	private Condition<Integer> onlinePointsCondition;

    /** 现金查询条件 */
	@JsonUnwrapped(prefix = "money")
	private Condition<Integer> moneyCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "onlineMoney")
	private Condition<Integer> onlineMoneyCondition;

    /** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 修改人查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 是否删除：1-已删除；0-未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除人查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public RateQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public RateQuery(RateEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public RateQuery(RateQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.firstBtypeIdCondition != null) {
			this.firstBtypeIdCondition = other.firstBtypeIdCondition.copy();
		}
		if(other.secondBtypeIdCondition != null) {
			this.secondBtypeIdCondition = other.secondBtypeIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.wxShopNameCondition != null) {
			this.wxShopNameCondition = other.wxShopNameCondition.copy();
		}
		if(other.wxShopNumberCondition != null) {
			this.wxShopNumberCondition = other.wxShopNumberCondition.copy();
		}
		if(other.ratioCondition != null) {
			this.ratioCondition = other.ratioCondition.copy();
		}
		if(other.pointsCondition != null) {
			this.pointsCondition = other.pointsCondition.copy();
		}
		if(other.onlinePointsCondition != null) {
			this.onlinePointsCondition = other.onlinePointsCondition.copy();
		}
		if(other.moneyCondition != null) {
			this.moneyCondition = other.moneyCondition.copy();
		}
		if(other.onlineMoneyCondition != null) {
			this.onlineMoneyCondition = other.onlineMoneyCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		this.setOther(other);
	}

	private void setOther(RateQuery other){
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<RateEntity> toQueryWrapper() {
		QueryWrapper<RateEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (firstBtypeIdCondition != null) {
			firstBtypeIdCondition.toWrapper(wrapper, COL_FIRST_BTYPE_ID);
		}
		if (secondBtypeIdCondition != null) {
			secondBtypeIdCondition.toWrapper(wrapper, COL_SECOND_BTYPE_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (wxShopNameCondition != null) {
			wxShopNameCondition.toWrapper(wrapper, COL_WX_SHOP_NAME);
		}
		if (wxShopNumberCondition != null) {
			wxShopNumberCondition.toWrapper(wrapper, COL_WX_SHOP_NUMBER);
		}
		if (ratioCondition != null) {
			ratioCondition.toWrapper(wrapper, COL_RATIO);
		}
		if (pointsCondition != null) {
			pointsCondition.toWrapper(wrapper, COL_POINTS);
		}
		if (onlinePointsCondition != null) {
			onlinePointsCondition.toWrapper(wrapper, COL_ONLINE_POINTS);
		}
		if (moneyCondition != null) {
			moneyCondition.toWrapper(wrapper, COL_MONEY);
		}
		if (onlineMoneyCondition != null) {
			onlineMoneyCondition.toWrapper(wrapper, COL_ONLINE_MONEY);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return getQueryWrapper(wrapper);
	}

	private QueryWrapper<RateEntity> getQueryWrapper(QueryWrapper<RateEntity> wrapper){
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回一级业态查询条件
	 * 
	 * @return firstBtypeIdCondition 一级业态查询条件
	 */
	public Condition<String> firstBtypeId() {
		this.firstBtypeIdCondition = new Condition<>();
		return this.firstBtypeIdCondition;
	}
	
	/**
	 * 获取一级业态查询条件
	 * 
	 * @return firstBtypeIdCondition 一级业态查询条件
	 */
	public Condition<String> getFirstBtypeIdCondition() {
		return firstBtypeIdCondition;
	}

	/**
	 * 设置一级业态查询条件
	 * 
	 * @param firstBtypeIdCondition 一级业态查询条件
	 */
	public void setFirstBtypeIdCondition(Condition<String> firstBtypeIdCondition) {
		this.firstBtypeIdCondition = firstBtypeIdCondition;
	}

	/**
	 * 构造并返回二级业态查询条件
	 * 
	 * @return secondBtypeIdCondition 二级业态查询条件
	 */
	public Condition<String> secondBtypeId() {
		this.secondBtypeIdCondition = new Condition<>();
		return this.secondBtypeIdCondition;
	}
	
	/**
	 * 获取二级业态查询条件
	 * 
	 * @return secondBtypeIdCondition 二级业态查询条件
	 */
	public Condition<String> getSecondBtypeIdCondition() {
		return secondBtypeIdCondition;
	}

	/**
	 * 设置二级业态查询条件
	 * 
	 * @param secondBtypeIdCondition 二级业态查询条件
	 */
	public void setSecondBtypeIdCondition(Condition<String> secondBtypeIdCondition) {
		this.secondBtypeIdCondition = secondBtypeIdCondition;
	}

	/**
	 * 构造并返回商铺id查询条件
	 * 
	 * @return merchantIdCondition 商铺id查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商铺id查询条件
	 * 
	 * @return merchantIdCondition 商铺id查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商铺id查询条件
	 * 
	 * @param merchantIdCondition 商铺id查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回微信店铺名称查询条件
	 * 
	 * @return wxShopNameCondition 微信店铺名称查询条件
	 */
	public Condition<String> wxShopName() {
		this.wxShopNameCondition = new Condition<>();
		return this.wxShopNameCondition;
	}
	
	/**
	 * 获取微信店铺名称查询条件
	 * 
	 * @return wxShopNameCondition 微信店铺名称查询条件
	 */
	public Condition<String> getWxShopNameCondition() {
		return wxShopNameCondition;
	}

	/**
	 * 设置微信店铺名称查询条件
	 * 
	 * @param wxShopNameCondition 微信店铺名称查询条件
	 */
	public void setWxShopNameCondition(Condition<String> wxShopNameCondition) {
		this.wxShopNameCondition = wxShopNameCondition;
	}

	/**
	 * 构造并返回微信店铺编号查询条件
	 * 
	 * @return wxShopNumberCondition 微信店铺编号查询条件
	 */
	public Condition<String> wxShopNumber() {
		this.wxShopNumberCondition = new Condition<>();
		return this.wxShopNumberCondition;
	}
	
	/**
	 * 获取微信店铺编号查询条件
	 * 
	 * @return wxShopNumberCondition 微信店铺编号查询条件
	 */
	public Condition<String> getWxShopNumberCondition() {
		return wxShopNumberCondition;
	}

	/**
	 * 设置微信店铺编号查询条件
	 * 
	 * @param wxShopNumberCondition 微信店铺编号查询条件
	 */
	public void setWxShopNumberCondition(Condition<String> wxShopNumberCondition) {
		this.wxShopNumberCondition = wxShopNumberCondition;
	}

	/**
	 * 构造并返回积分配比类型 多个 0,1查询条件
	 * 
	 * @return ratioCondition 积分配比类型 多个 0,1查询条件
	 */
	public Condition<String> ratio() {
		this.ratioCondition = new Condition<>();
		return this.ratioCondition;
	}
	
	/**
	 * 获取积分配比类型 多个 0,1查询条件
	 * 
	 * @return ratioCondition 积分配比类型 多个 0,1查询条件
	 */
	public Condition<String> getRatioCondition() {
		return ratioCondition;
	}

	/**
	 * 设置积分配比类型 多个 0,1查询条件
	 * 
	 * @param ratioCondition 积分配比类型 多个 0,1查询条件
	 */
	public void setRatioCondition(Condition<String> ratioCondition) {
		this.ratioCondition = ratioCondition;
	}

	/**
	 * 构造并返回线下积分查询条件
	 * 
	 * @return pointsCondition 线下积分查询条件
	 */
	public Condition<Integer> points() {
		this.pointsCondition = new Condition<>();
		return this.pointsCondition;
	}
	
	/**
	 * 获取线下积分查询条件
	 * 
	 * @return pointsCondition 线下积分查询条件
	 */
	public Condition<Integer> getPointsCondition() {
		return pointsCondition;
	}

	/**
	 * 设置线下积分查询条件
	 * 
	 * @param pointsCondition 线下积分查询条件
	 */
	public void setPointsCondition(Condition<Integer> pointsCondition) {
		this.pointsCondition = pointsCondition;
	}

	/**
	 * 构造并返回线上积分查询条件
	 * 
	 * @return onlinePointsCondition 线上积分查询条件
	 */
	public Condition<Integer> onlinePoints() {
		this.onlinePointsCondition = new Condition<>();
		return this.onlinePointsCondition;
	}
	
	/**
	 * 获取线上积分查询条件
	 * 
	 * @return onlinePointsCondition 线上积分查询条件
	 */
	public Condition<Integer> getOnlinePointsCondition() {
		return onlinePointsCondition;
	}

	/**
	 * 设置线上积分查询条件
	 * 
	 * @param onlinePointsCondition 线上积分查询条件
	 */
	public void setOnlinePointsCondition(Condition<Integer> onlinePointsCondition) {
		this.onlinePointsCondition = onlinePointsCondition;
	}

	/**
	 * 构造并返回现金查询条件
	 * 
	 * @return moneyCondition 现金查询条件
	 */
	public Condition<Integer> money() {
		this.moneyCondition = new Condition<>();
		return this.moneyCondition;
	}
	
	/**
	 * 获取现金查询条件
	 * 
	 * @return moneyCondition 现金查询条件
	 */
	public Condition<Integer> getMoneyCondition() {
		return moneyCondition;
	}

	/**
	 * 设置现金查询条件
	 * 
	 * @param moneyCondition 现金查询条件
	 */
	public void setMoneyCondition(Condition<Integer> moneyCondition) {
		this.moneyCondition = moneyCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return onlineMoneyCondition 查询条件
	 */
	public Condition<Integer> onlineMoney() {
		this.onlineMoneyCondition = new Condition<>();
		return this.onlineMoneyCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return onlineMoneyCondition 查询条件
	 */
	public Condition<Integer> getOnlineMoneyCondition() {
		return onlineMoneyCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param onlineMoneyCondition 查询条件
	 */
	public void setOnlineMoneyCondition(Condition<Integer> onlineMoneyCondition) {
		this.onlineMoneyCondition = onlineMoneyCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人查询条件
	 * 
	 * @param createdByCondition 创建人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回修改人查询条件
	 * 
	 * @return modifiedByCondition 修改人查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取修改人查询条件
	 * 
	 * @return modifiedByCondition 修改人查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置修改人查询条件
	 * 
	 * @param modifiedByCondition 修改人查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回是否删除：1-已删除；0-未删除查询条件
	 * 
	 * @return delCondition 是否删除：1-已删除；0-未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取是否删除：1-已删除；0-未删除查询条件
	 * 
	 * @return delCondition 是否删除：1-已删除；0-未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置是否删除：1-已删除；0-未删除查询条件
	 * 
	 * @param delCondition 是否删除：1-已删除；0-未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人查询条件
	 * 
	 * @return delByCondition 删除人查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取删除人查询条件
	 * 
	 * @return delByCondition 删除人查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人查询条件
	 * 
	 * @param delByCondition 删除人查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
